var mongoose = require('mongoose');
var materializedPlugin = require('mongoose-materialized');
var Schema = mongoose.Schema;

// mongoose.connect('mongodb://localhost/materialized');

var schema = new Schema({
  type: Number,
  title: String,
  parentId:String,
  expand:{type:Boolean,default:true} 
});

schema.plugin(materializedPlugin);

module.exports= mongoose.model('Cate', schema,'cate'); // Category